﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Http.Dispatcher;
using App.Domain.Model;

using App.Service.WebAPI.Controllers;

namespace App.Service.WebAPI
{
    internal class ControllerComposer : IHttpControllerActivator
    {
        private Logic logic;
        private IRepository repository;
        private string connectionString = @"Data Source=PSHYS0256\SQLEXPRESS;Initial Catalog=AdventureWorks2008R2;User=sa;Password=Deadman@1990";
        internal ControllerComposer()
        {
            //repository = new EFRepository(connectionString);
            logic = new Logic(repository);
        }
        public System.Web.Http.Controllers.IHttpController Create(System.Net.Http.HttpRequestMessage request, System.Web.Http.Controllers.HttpControllerDescriptor controllerDescriptor, Type controllerType)
        {
            //if (controllerType == typeof(XXXController))
            //{
            //    return new XXXController(logic);
            //}
            return null;
        }
    }
}
